package com.itsu.compoment.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

/**
 * @author 苏犇
 * @create time 2019/12/8 16:46
 */
@Component
@Slf4j
public class BootMsgReturn implements RabbitTemplate.ReturnCallback {
    @Override
    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
        log.info("replyCode:{}; replayText:{}; exchange:{} ; routintKey:{}", replyCode, replyText, exchange, routingKey);
    }
}
